/*************************************************************************
	> File Name: PrintStreamTest.java
	> Author: Potter
	> Mail: tobewhatwewant@gmail.com 
	> Created Time: 2014年06月01日 星期日 12时29分51秒
 ************************************************************************/

import java.io.FileOutputStream;
import java.io.OutputStream;
import java.io.PrintStream;

public class PrintStreamTest {
    public static void main(String [] args) throws Exception {
        // OutputStream in = new FileOutputStream("./tmp.dat");
        // PrintStream ps = new PrintStream(in);
        PrintStream ps = new PrintStream("./tmp.txt");

        System.setOut(ps);

        int num = 0;
        for (int i = 0; i < 65525; i++) {
            System.out.print((char)i);
            num++;
            if (num == 100) {
                System.out.println();
                num = 0;
            }
        }
    }
}
